<template>
  <div class="hd">
    <input type="text" v-model="inputValue">
    <button @click="add">添加</button>
  </div>
  <Child :list="list" />
</template>

<script setup>
import Child from './child.vue'
import { ref } from 'vue'

const inputValue = ref('')
const list = ref(['html', 'css', 'js'])

const add = () => {
  list.value.push(inputValue.value)
  inputValue.value = ''
}
</script>

<style lang="css" scoped>

</style>